package com.zhiche.lisa.lspm.service.driver;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.zhiche.lisa.core.supports.BaseException;
import com.zhiche.lisa.lspm.dao.model.driver.DriverCheckin;
import com.zhiche.lisa.lspm.dao.model.driver.bo.DriverCheckinBO;
import com.zhiche.lisa.lspm.dao.model.driver.bo.DriverCheckinLineBO;
import com.zhiche.lisa.lspm.dto.DriverCheckinDTO;
import com.zhiche.lisa.lspm.vo.driver.DriverCheckinLineVO;
import com.zhiche.lisa.lspm.vo.driver.DriverCheckinVO;
import com.zhiche.lisa.lspm.vo.driver.OtmCheckinVO;

import java.util.List;

/**
 * 司机报班记录 service
 *
 * @author lbl
 * @since 2018-05-31
 */
public interface IDriverCheckinService extends IService<DriverCheckin> {

    /**
     * 报班记录列表
     */
    Page<DriverCheckinLineVO> driverCheckinLine(Page<DriverCheckinLineBO> page);

    /**
     * 取消报班列表
     */
    Page<DriverCheckinLineVO> driverCancelCheckinLine(Page<DriverCheckinLineBO> page);

    /**
     * 取消审核报班
     */
    Boolean authDriverCheckIn(Integer[] driverCheckIds, String authorization) throws BaseException;

    /**
     * 得到36小时前的报班
     */
    List<DriverCheckin> getDriverCheckin36HoursNoTenant() throws Exception;

    /**
     * 更新司机报班状态
     */
    void updateCheckinStatus(Long checkinId, String status) throws BaseException;

    /**
     * 分页显示报班
     */
    Page<DriverCheckinVO> getChekin(Page<DriverCheckinBO> page);

    /**
     * 取消报班
     */
    void cancelChekin(DriverCheckinBO driverCheckinBO, String authorization) throws BaseException;

    /**
     * otm取消报班
     */
    void otmCancelChekin(OtmCheckinVO otmCheckinVO) throws BaseException;

    /**
     * 直接取消报班不通过审核
     */
    void checkInNonAudited(DriverCheckinBO driverCheckinBO, String authorization);

    /**
     * 获取当天报班信息
     */
    List<DriverCheckin> selectByNowDayNoTenant(Long driverId);

    /**
     * 司机报班
     */
    void checkin(DriverCheckinBO driverCheckinBO, String authorization) throws BaseException;

    /**
     * 得到报班的记录推送到集成项目中
     */
    DriverCheckinDTO getDriverCheckinById(Long checkinId);

    /**
     * 分页查询车辆报班信息 pc
     */
    Page<DriverCheckinDTO> queryCheckinList(Page<DriverCheckinDTO> page);

    /**
     * 车辆报班
     */
    void insertNewCheckIn(DriverCheckinDTO dto, String token);

    /**
     * 车辆报班
     */
    void driverCheckinToOtm(Long id, String authorization);

    DriverCheckinDTO getDriverCheckinByIdNoTenant(Long id);

    /**
     * 获取司机报班传入OTM日志列表
     * */
    Page<DriverCheckinLineVO> otmDriverCheckinLog(Page<DriverCheckinLineBO> page);

    List<DriverCheckin> selectCheckinByLspId(String lspId);

    List<DriverCheckin> selectCheckinByFleetId(String fleetId);
}
